import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { AlertFilled } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/ala',
    name: 'ala',
    redirect: '/ala/AlaList',
    component: Layout,
    meta: {
      title: '告警管理',
      sort: 3,
    },
    children: [
      {
        path: 'AlaList',
        name: 'AlaList',
        meta: {
          title: '实时告警清单',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/AlaList/Index.vue'),
      },
      {
        path: 'AlaHistory',
        name: 'AlaHistory',
        meta: {
          title: '告警历史记录',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/AlaHistory/Index.vue'),
      },
      {
        path: 'AlaPointTem',
        name: 'AlaPointTem',
        meta: {
          title: '测点告警模板',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/AlaPointTem/Index.vue'),
      },
      {
        path: 'AlaConfig',
        name: 'AlaConfig',
        meta: {
          title: '告警配置',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/AlaConfig/Index.vue'),
      },
      {
        path: 'AlaTem',
        name: 'AlaTem',
        meta: {
          title: '信息模板',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/AlaTem/Index.vue'),
      },
    ],
  },
];

export default routes;
